#ifndef CHARACTER_H
#define CHARACTER_H

#include <string>

#include "util/Debug.hpp"

#include "GameEngine/Map.hpp"
#include "GameEngine/Moveable.hpp"

class Character : public Moveable
{
    public:
		typedef int 	Direction;
		static const 	Direction	North 	= 1;
		static const 	Direction	South 	= 2;
		static const 	Direction	West 	= 3;
		static const 	Direction	East 	= 4;
		static const 	Direction	None 	= 5;

		typedef int 	States;
		static const 	States		ALIVE	= 1;
		static const 	States		DEAD	= 2;
		static const 	States		WAITING = 3;

        Character(Map*);
        virtual ~Character();

        virtual void Move(float);

        Direction 	GetDirectionVertical()            	{ return m_DirectionVertical; }
        void 		SetDirectionVertical(Direction val) { m_DirectionVertical = val;}

        Direction 	GetDirectionHorizontal()          	{ return m_DirectionHorizontal; }
        void 		SetDirectionHorizontal(Direction val){ m_DirectionHorizontal = val; }

        string 		GetName()          					{ return m_name; }
        void 		SetName(string p_newName)			{ m_name = p_newName; }

        unsigned int GetKill()          				{ return m_kill; }
        void 		SetKill(unsigned int p_kill)		{ m_kill = p_kill; }
        void 		AddKill()							{ m_kill++; }

        unsigned int GetDeath()          				{ return m_death; }
        void 		SetDeath(unsigned int p_death)		{ m_death = p_death; }
        void 		AddDeath()							{ m_death++; }

        unsigned int GetID()          					{ return m_id; }
        void 		SetID(unsigned int p_ID)			{ m_id = p_ID; }

        States 		GetState()          				{ return m_state; }
        void 		SetState(Character::States p_State)	{ m_state = p_State; }
        bool 		Spawn								();
        void 		Spawn								(sf::Vector2f);

        float		GetLife()          					{ return m_life; }
        void 		SetLife(unsigned int p_life)		{ m_life = p_life; }
        bool 		TakeDamage(const float p_damage);

        bool		CanShoot();
        void 		Shoot();
    protected:
    private:
        Direction 		m_DirectionVertical;
        Direction 		m_DirectionHorizontal;
        string 			m_name;
        States 			m_state;
        float 			m_life;
        float			m_timerShoot;
        unsigned int 	m_kill;
        unsigned int 	m_death;
        unsigned int	m_id;
};

#endif // CHARACTER_H
